$border-radius: 8px;

.placeholder {
  display: flex;
  align-items: center;
  border-radius: 5px;
  padding: var(--vd-spacing-xs) var(--vd-spacing-sm);
  gap: var(--vd-spacing-sm);
  border: 1px solid var(--vd-color-gray-400);
  margin: 2rem 0;

  &:hover,
  &:focus {
    border: 1px solid var(--vd-color-primary);
  }

  .urlInput {
    flex: 1;
    border: none;
    outline: none;
    line-height: 1.8;
  }

  .inputExample {
    color: var(--vd-color-gray-700);
    cursor: pointer;
  }
}

.container {
  position: relative;
  border: 1px solid var(--vd-color-gray-400);
  border-radius: $border-radius;

  .frame {
    border: none;
    width: 100%;
    height: 100%;
    border-radius: $border-radius;
    overflow: hidden;
  }

  .actions {
    display: flex;
    position: absolute;
    left: 100%;
    height: 100%;
    top: 0;
    flex-direction: column;
    padding: 0 6px;
    opacity: 0;

    svg {
      color: var(--vd-color-gray-700);
      cursor: pointer;
      padding: 4px;
      width: 30px;
      height: 30px;

      &:hover {
        color: var(--vd-color-gray-900);
      }
    }
  }

  &:hover .actions,
  &:focus .actions {
    opacity: 1;
  }

  .mask {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    pointer-events: none;
    z-index: 1;

    &.resizing {
      pointer-events: all;
    }
  }

  :global(.react-resizable-handle) {
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    z-index: 1;
    display: block;
    height: 5px;
    width: 80px;
    border-radius: 4px;
    background-color: rgb(146 146 146 / 95%);
    cursor: row-resize;
  }
}

.root:global(.selected) {
  outline: 2px solid var(--vd-color-primary);
  border-radius: $border-radius;
}
